package com.cn.wanxi.service;

import com.cn.wanxi.dao.CompanyDao;
import com.cn.wanxi.model.CompanyModel;

public class CompanyService {
    /**
     * 给前端页面公司对象提供数据
     *
     * @return
     */
    public CompanyModel getCompanyModel() {
//        需要返回一个公司对象，就需要创建一个公司对象
        CompanyModel companyModel = new CompanyModel();
//        CompanyDao companyDao=new CompanyDao();
//        将值赋值给对象的属性,值从数据持久层来
        companyModel.setLogo(CompanyDao.LOGO);
        companyModel.setPhone(CompanyDao.PHONE);
        companyModel.setNet(CompanyDao.NET);
        companyModel.setEmail(CompanyDao.EMAIL);
        companyModel.setLinePhone(CompanyDao.LINE_PHONE);
        companyModel.setVersion(CompanyDao.VERSION);
        companyModel.setAddress(CompanyDao.ADDRESS);
        return companyModel;
    }
}
